package com.ggkt.question.common;

/**
 * 链表数据结构模拟
 * @Author ggkt
 */
public class ListNode {
    public int val;
    public ListNode next;
    public ListNode(int x) { val = x; }

    public static void a(ListNode l1){
        System.out.println("secondNode 的值为："+l1.next.next.val);
    }
    public static void main(String[] args){
        ListNode head=new ListNode(0);
        ListNode firstNode = new ListNode(1);
        ListNode secondNode = new ListNode(2);
        ListNode thirdNode = new ListNode(3);
        head.val=1;
        head.next=firstNode;
        firstNode.next = secondNode;
        secondNode.next = thirdNode;
        a(head);
    }
}
